Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports - Angela & Stephanie #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

AngelaOh
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Method signature, arguments, block.
What are the advantages of using git when collaboratively working on one code base? You don't have to work off of one computer.
What kind of relationship did you and your pair have with the unit tests? We raked a lot from the beginning but it took time to understand what each test was looking for.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used .include? and it was helpful because it allowed us to iterated through our array with one line.
What was one method you and your pair used to debug code? We ran the wave files in the beginning. We also used our own values in ran the code for ourselves. Finally, rake was used often.
What are two discussion points that you and your pair discussed when giving/receiving feedback from each other that you would be willing to share? We would have both liked to pseudocode more and pause before writing the actual code. Something we did well was that being super communicative as we were coding, sharing feedback and thoughts as we went.

@tildeee
Copy link

tildeee commented Mar 4, 2019

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions x
Both teammates contributed to the codebase x
Small commits with meaningful commit messages wish there were more, smaller commits. Also, I'm expecting commit messages with descriptions of the changes, rather than "wave 2" etc
Code Requirements
draw_letters method x
Uses appropriate data structure to store the letter distribution x
All tests for draw_letters pass x
uses_available_letters? method x
All tests for uses_available_letters? pass x
score_word method x
Uses appropriate data structure to store the letter scores x
All tests for score_word pass x
highest_score_from method x
Appropriately handles edge cases for tie-breaking logic x
All tests for highest_score_from pass x
Overall

Nice work on this project.

Your code is readable and has good code style; well done on that!

There are a few places that I think aren't quite doing what you want to be doing, so I'm adding a few comments on that.

Overall, your code looks good and I see no red flags. Good work!

"Z",
]

hand = pool[1..98].sample(10)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have [1..98]? What does this do? The tests still pass with this part taken out


split_word.each do |letter|
index = letters_in_hand.index(letter)
if letters_in_hand.all? { letter } && index != nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the letters_in_hand.all? { letter } part do? This code actually just checks if letter is not nil or false! Sometimes, it's good to check that letters_in_hand has no nil or false elements, but in this case, I think it's okay to assume that won't be the case. In general, just checking if index != nil (aka, if index is not nil, it's because it found something in the last line) probably suffices


def is_in_english_dict?(input)
CSV.open("assets/dictionary-english.csv", "r").each do |word|
return true if word.include?(input)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, is word.include?(input) the logic you want? What if input is shoe and word is horseshoe? Of course, in this case, shoe would probably be in the dictionary, but the line word.include?(input) is still probably not the logic you want here.

return true if word.include?(input)
end
return false
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done on the optional method! ... where are the tests to make sure it actually works? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants